//
//  ActivityCategoryCell.m
//  Movie
//
//  Created by huazi on 15/11/4.
//  Copyright © 2015年 huazi. All rights reserved.
//

#import "ActivityCategoryCell.h"
#import "CategoryView.h"
@interface ActivityCategoryCell()<CategoryViewDelegate>
@property (nonatomic)BOOL isLoaded;
@end
@implementation ActivityCategoryCell

- (void)setDataCell:(id)model {
    self.model =model;
    NSArray *modelData =model;
    if (modelData==nil||modelData.count==0) return;
    if (self.isLoaded) return ;
    CategoryView *_cat =[[CategoryView alloc] initWithFrame:CGRectMake(0, 0, DeviceWidth, 160)];
    _cat.arrayItems =modelData;
    _cat.delegate =self;
    [_cat setSubviews];
    [self.contentView addSubview:_cat];
    self.isLoaded =YES;

}
@end
